package com.example.fragmentaddviewpager;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager2.widget.ViewPager2;

import android.os.Bundle;

import com.example.fragmentaddviewpager.adapter.MyAdapter;

public class MainActivity extends AppCompatActivity {
    private ViewPager2 viewPager2 =null;
    private MyAdapter adapter =null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        viewPager2 =findViewById(R.id.viewPager);
        adapter =new MyAdapter();
        viewPager2.setAdapter(adapter);
    }
}